package hngc.com;

import java.util.Scanner;

public class Box19 {
    public static void main(String[] args) {
        double a=0;
        double b=0;
        double c=0;
        double d=0;
        int x=0;
        int y=0;
        Scanner scanner=new Scanner(System.in);
        System.out.println("输入x值:");
        while (scanner.hasNext()){
            try {
                x=scanner.nextInt();
                System.out.println("输入y值:");
                y=scanner.nextInt();
                break;
            }catch (Exception e){
                System.out.println("输入必须为整形");
                return;
            }
        }
        System.out.println(x+y);
        if(x>9&&y>4){
            if(x>20||y>10){
                c=Math.sin(x+y);
                System.out.println("c的值:"+c);
            }else {
                d=Math.pow((x+5),5);
                System.out.println("d的值:"+d);
            }
        }else{
            if (x>0||y>0){
                a=Math.pow(x,y);
                System.out.println("a的值:"+a);
            }else {
                b=x+y;
                System.out.println("b的值:"+b);
            }
        }
        scanner.close();
    }
}
